Blocks: Introduce WP_Block_Node class.#10796
Conversation
|
@dlh01 by all means! please do share. If you are willing I think it would be nice to get more feedback on how this can be or would be used. My primary goal would be to keep this class mostly a “record,” being more or less an associative array whose keys are known up-front and documented. I do think that these little helper methods are useful to address really common concerns though, like answering “is this a (core/)gallery?” and “does this have the block supports attribute?” I wish I had focused on these development needs earlier before we standardized the array form, which was meant to keep things simple. The more code we can examine and play with, the better! |
|
Hey @dmsnell — after completing a task for a client recently, I went back to see how I might have completed the same task with The task was to create a
I'll keeping looking out for these opportunities and will share more feedback as I can. Thanks! |
|
this is awesome feedback @dlh01 — I will get back to it, but not today |
Experimenting on adding a stable record-type class with helpers for holding raw block properties as parsed from a serialized document.